package com.jeesite.modules.dataScreen.web;

import com.alibaba.fastjson2.JSONObject;
import com.jeesite.modules.dataScreen.service.NavService;
import com.jeesite.modules.dataScreen.web.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "交通运行-总驾驶舱")
@RequestMapping("/mainCockpit")
public class NavApi {

    @Autowired
    private NavService navService;

    @GetMapping("/cockpitData")
    @ApiOperation("/驾驶舱数据")
    public Result<CockpitVO> cockpitData(){
        CockpitVO result=navService.cockpitData();
        return Result.OK(result);
    }

    @GetMapping("/trafficMainKPIClick")
    @ApiOperation("/交通主要KPI点击")
    public Result<JSONObject> trafficMainKPIClick(){
        JSONObject result=navService.trafficMainKPIClick();
        return Result.OK(result);
    }
    @GetMapping("/trafficMainKPI")
    @ApiOperation("/交通主要KPI")
    public Result<List<IndustryIndexVo>> trafficMainKPI(){

        return Result.OK(navService.trafficMainKPI());
    }

    @GetMapping("/infrastructure")
    @ApiOperation("/基础设施")
    public Result<InfrastructureVO> infrastructure(){
        InfrastructureVO result=navService.infrastructure();
        return Result.OK(result);
    }


}
